# v483 — Controlled Driver-App Live GPS Activation

Current baseline before build: v482.1.

v483 restores the original Fleet Map sequence by moving from consent/privacy/start-stop readiness into controlled driver-app live GPS activation. This build allows fresh eligible driver-app GPS session coordinates to control a green marker only through the audited Fleet Map live GPS session endpoint.

## What changed

- Enabled controlled driver-app real GPS intake for the internal Fleet Map driver-app path.
- Enabled the controlled driver-app live GPS activation-phase guard.
- Enabled controlled driver-app live GPS coordinate mutation.
- Preserved the audited live GPS session endpoint: `/api/fleet-map/driver-app-live-gps-sessions`.
- Fresh eligible driver-app GPS coordinates can now control a green marker.
- Stale, stopped, or manually stale driver-app GPS loses green trust and falls back to blue/non-live review.
- Added restart-after-stop behavior so a stopped live GPS session can be started again for the next active dispatch movement.
- Kept all live GPS recording behind required acknowledgements: consent, privacy, active-dispatch-only use, live-marker understanding, stop/revoke boundary, and a session note.
- Kept GPS/ELD/telematics provider and Google Geocoding/Routes server calls disabled.
- No Prisma schema change.

## What's Visible

### In Workspace Operations / Fleet Map

Users will see the existing live GPS session surface become the controlled activation layer:

- Ready/live/stale/stopped live GPS session states.
- Controlled live GPS session recorder with latitude, longitude, signal age, speed, accuracy, and acknowledgements.
- Fresh eligible driver-app GPS can make the marker green.
- Stale, stopped, or manually stale driver-app GPS falls back out of green trust.
- Live GPS dashboard and audit trail remain visible.

The existing v482 review-only panels remain visible:

- Fleet alerts
- Map performance
- Production readiness

### In Super Admin

No Super Admin behavior changed.

### In Workspace Admin

No billing, subscription, entitlement, plan, integration, or settings behavior changed.

## Guardrails

- Green markers are fresh driver-app GPS only.
- Manual, dispatcher-confirmed, estimated, ELD/provider sandbox, readiness-only, stale, or stopped records cannot turn a marker green.
- GPS/ELD/telematics provider APIs remain disabled.
- Google Geocoding API and Google Routes API remain disabled.
- Payment collection, broker distribution limits, owned portal rules, internal load-board access, and Transportation Accounting remain unchanged.
- Prisma schema was not changed.

## Environment flags

The controlled driver-app activation flags are now enabled for this build:

```text
DISPATCH_SPOT_FLEET_MAP_DRIVER_APP_GPS_REAL_INTAKE_ENABLED="true"
DISPATCH_SPOT_FLEET_MAP_DRIVER_APP_LIVE_GPS_SESSION_RECORDING_ENABLED="true"
DISPATCH_SPOT_FLEET_MAP_DRIVER_APP_LIVE_GPS_COORDINATE_MUTATION_ENABLED="true"
DISPATCH_SPOT_FLEET_MAP_DRIVER_APP_LIVE_GPS_ACTIVATION_PHASE_ENABLED="true"
DISPATCH_SPOT_FLEET_MAP_PROVIDER_TELEMATICS_MARKER_MUTATION_ENABLED="false"
DISPATCH_SPOT_FLEET_MAP_PRODUCTION_PROVIDER_APIS_ENABLED="false"
DISPATCH_SPOT_GOOGLE_ROUTES_API_CALLS_ENABLED="false"
DISPATCH_SPOT_GOOGLE_GEOCODING_API_CALLS_ENABLED="false"
```

## Build validation

- Preflight should be run with `node scripts/dispatchspot-build-preflight.mjs` or `npm run dispatchspot:preflight` on the server.
- Source package integrity should be validated with `unzip -t` on the generated zip.
- The server remains the full Next.js build validation path because local sandbox dependencies are not installed.

## Next suggested prompt

```text
Current baseline on server is v483

review v483 Controlled driver-app live GPS activation, then decide whether to proceed with v484 Provider-neutral ELD/telematics connector contract or first harden live GPS freshness/stale fallback/start-stop audit behavior before activating production GPS/ELD/telematics provider APIs, Google Geocoding/Routes API calls, changing payment collection, broker distribution limits, owned portal rules, internal load-board access, or Transportation Accounting activation
```